/// <summary>
/// 定义主题（Subject）接口
/// </summary>
public interface ISubject
{
    /// <summary>
    /// 注册观察者
    /// </summary>
    /// <param name="observer"></param>
    void RegisterObserver(IObserver observer);
    /// <summary>
    /// 移除观察者
    /// </summary>
    /// <param name="observer"></param>
    void UnregisterObserver(IObserver observer);
    /// <summary>
    /// 通知观察者
    /// </summary>
    void NotifyObservers();
}